import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:toolbox/page/browser/browser_logic.dart';
import 'package:toolbox/page/browser/browser_view.dart';
import 'package:toolbox/page/qr/qr_view.dart';
import 'package:toolbox/page/translate/translate_view.dart';
import 'package:toolbox/page/video_edit/view.dart';

class HomeState {

  final qrPage = QrPage();

  final translatePage = TranslatePage();

  final videoEditPage = VideoEditPage();

  final browserPage = BrowserPage();

  late DateTime backTime;

  late Widget currentPage;

  late BuildContext context;

  final RxBool editWebTitle = false.obs;

  bool get hadStar {
    if (Get.isRegistered<BrowserLogic>()) {
      return Get.find<BrowserLogic>().state.isStar.value;
    }
    return false;
  }

  HomeState() {
    ///Initialize variables
    currentPage = translatePage;
    backTime = DateTime.now();
  }
}
